home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_03 / allison / assert.h < prev    next >
C/C++ Source or Header  |  1994-02-07  |  309b  |  18 lines

  1.  
  2. LISTING 5 - Implementation of the assert macro
  3. /* assert.h */
  4.  
  5. extern void __assert(char *, char *, long);
  6. #undef assert
  7. #ifdef NDEBUG
  8. #define assert(cond)
  9.     (void) 0
  10. #else
  11.  
  12. #define assert(cond) \
  13.     ((cond)          \
  14.        ? (void) 0    \
  15.        : __assert(#cond,__FILE__,__LINE__))
  16.  
  17.  
  18.